package thread;

public class TreadDemo {
    public static void main(String[] args) {
        Thread t1 = new MyThread1();
        Thread t2 = new MyThread2();
        t1.start();
        t2.start();
    }
}

class MyThread1 extends Thread{
    @Override
    public void run() {
        System.out.println("线程1开始了");
    }
}

class  MyThread2 extends Thread{
    @Override
    public void run() {
        System.out.println("线程2开始了");
    }
}